//
//  SellerFourBoxTableViewCell.m
//  SmartCoin
//
//  Created by apple on 2018/3/8.
//  Copyright © 2018年 Cynic. All rights reserved.
//

#import "SellerFourBoxTableViewCell.h"

@implementation SellerFourBoxTableViewCell
/**
 @property (nonatomic ,retain)UILabel *money;//现金收益
 @property (nonatomic ,retain)UILabel *points;//积分收益
 @property (nonatomic ,retain)UILabel *deals;//交易数
 @property (nonatomic ,retain)UILabel *buyers;//顾客总计
 */

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
//    NSArray *colors = @[[UIColor orangeColor],[UIColor purpleColor],[UIColor redColor],[UIColor cyanColor]];
    NSArray *dess = @[@"现金收益",@"积分收益",@"交易数(笔)",@"顾客总计(人)"];
    
    for (NSInteger index = 0; index < 4; index ++) {
        UIView *partView = [[UIView alloc] initWithFrame:CGRectMake(cx_wid / 2 * (index % 2), 90 * (index / 2), cx_wid / 2, 90)];
        partView.backgroundColor = [UIColor whiteColor];
        UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 35, cx_wid / 2, 20)];
        UILabel *des = [[UILabel alloc] initWithFrame:CGRectMake(0, 60, cx_wid / 2, 18)];
        des.text = dess[index];
        label.textColor = [CXSinglerModel colorWithHex:@"#666666" alpha:1];
        des.textColor = [CXSinglerModel colorWithHex:@"#999999" alpha:1];
        label.textAlignment = des.textAlignment = NSTextAlignmentCenter;
        label.font = [UIFont systemFontOfSize:20];
        des.font = [UIFont systemFontOfSize:13];
        if (index == 0) {
            _money = label;
        }
        else if (index == 1) {
            _points = label;
        }
        else if (index == 2) {
            _deals = label;
        }
        else if (index == 3) {
            _buyers = label;
        }
        [partView addSubview:label];
        [partView addSubview:des];
        [self.contentView addSubview:partView];
    }
    return self;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


@end
